//------------------------------------------------------------------------------
// TApplicationData class
// Used to allow information sharing between application's modules...
//------------------------------------------------------------------------------

unit uapplicationdata;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, Forms;

type

    { TApplicationData }

    TApplicationData = class
    private
      FMainForm: Tform;
       procedure SetMainForm(const AValue: Tform);

    public
       constructor Create(aMainForm: TForm);
       destructor Destroy; override;
       property MainForm: Tform read FMainForm write SetMainForm;
end;

implementation

{ TApplicationData }

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------

procedure TApplicationData.SetMainForm(const AValue: Tform);
begin
  if FMainForm=AValue then exit;
  FMainForm:=AValue;
end;

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------

constructor TApplicationData.Create(aMainForm: TForm);
begin
   MainForm := aMainForm;
end;

//------------------------------------------------------------------------------
//
//------------------------------------------------------------------------------

destructor TApplicationData.Destroy;
begin
  inherited Destroy;
end;

end.

